
#ifndef  FILESTREAMCHARPERSIST_H
#define  FILESTREAMCHARPERSIST_H


#include "IPersist.h"
#include <istream>

class FileStreamCharPersist : public IPersist {
public:
    FileStreamCharPersist(const std::string & filePath);
    virtual ~FileStreamCharPersist();

    void open() const override;
    const long long readLongLong() const override;
    void writeLongLong(const long long seqNo) override;

    void close() const override;
    void flush() override;
private:
    std::string filePath;
    mutable std::basic_iostream<char> *io;
};


#endif   /* FILESTREAMCHARPERSIST_H */
